import requests
import time

# for i in range(1,5):
#     url = 'https://data.10jqka.com.cn/funds/gnzjl/field/tradezdf/order/desc/page/'+str(i)+'/ajax/1/free/3/'
#     print(url)
#     response = requests.get(url)
#     # 确保请求成功,如果不成功会抛出异常
#     response.raise_for_status()
#     print(response.text)
#     time.sleep()
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
    'Cookie':'qgqp_b_id=a290e3a2c95adc0a0c69b1f9b6739eca; cdv_finance.eastmoney.com=1; cdv_guba.eastmoney.com=1; websitepoptg_api_time=1721477363476; st_si=22080561514495; st_asi=delete; st_pvi=78804597113745; st_sp=2024-07-20%2020%3A09%3A23; st_inirUrl=https%3A%2F%2Fcn.bing.com%2F; st_sn=7; st_psi=20240720202400697-113300300871-4257859355'
            # 'Hm_lvt_722143063e4892925903024537075d0d=1721390901; '
            #  'Hm_lvt_929f8b362150b1f77b477230541dbbc2=1721390901; '
            #  'Hm_lvt_78c58f01938e4d85eaf619eae71b4ed1=1721390901; '
            #  'Hm_lvt_60bad21af9c824a4a0530d5dbf4357ca=1721390901; '
            #  'Hm_lvt_f79b64788a4e377c608617fba4c736e2=1721390901; '
            #  'HMACCOUNT=CF85A14AD788A360; '
            #  'Hm_lpvt_722143063e4892925903024537075d0d=1721390901; '
            #  'Hm_lpvt_929f8b362150b1f77b477230541dbbc2=1721390901; '
            #  'Hm_lpvt_60bad21af9c824a4a0530d5dbf4357ca=1721390901; '
            #  'Hm_lpvt_78c58f01938e4d85eaf619eae71b4ed1=1721390901; '
            #  'Hm_lpvt_f79b64788a4e377c608617fba4c736e2=1721390901; '
            #  'log=; '
            #  'u_ukey=A10702B8689642C6BE607730E11E6E4A; '
            #  'u_uver=1.0.0; '
            #  'u_dpass=bqkFClseEeSnRKkMcwSbtq3dfetiAgAiDiu934XKOe5vmS3FP72SbsKj3Yu%2BAW5%2BHi80LrSsTFH9a%2B6rtRvqGg%3D%3D; '
            #  'u_did=A56AAF622DC943098695F93CC0D14D99; '
            #  'u_ttype=WEB; refreshStat=off; '
            #  'v=AyOXKoR4QY49ZA2nsbDxISCOsmzIGLcC8a37jlWAeXL5N00S3ehHqgF8i-xm'
    # 这里可以添加更多的header信息
}
print(headers)
url = 'https://data.10jqka.com.cn/funds/gnzjl/field/tradezdf/order/desc/page/1/ajax/1/free'
# 东方财富网通过jquery来存储数据，获取 URL_DFCF = 'https://data.eastmoney.com/bkzj/gn.html'
print(url)
response = requests.get(url,headers=headers)
print(response.text)
# 确保请求成功,如果不成功会抛出异常
response.raise_for_status()
print(response.text)
time.sleep(1)